//导入request.js
import request from "@/utils/request";

export const queryClassListApi = (name, begin, end, page, pageSize) =>
  request.get(
    `/clazzs?name=${name}&page=${page}&pageSize=${pageSize}&begin=${begin}&end=${end}`
  );

export const queryClassByIdApi = (id) => request.get(`/clazzs/${id}`);

export const deleteClassApi = (id) => request.delete(`/clazzs/${id}`);

export const addClassApi = (data) => request.post(`/clazzs`, data);

export const updateClassApi = (data) => request.put(`/clazzs`, data);

//查询所有班级
export const queryAllClassApi = () => request.get("/clazzs/list");
